#include <iostream>
#include "interval.h"

using namespace std;

int main()
{
	interval<double> I, U, R;
	
	for (int i = 1; i < 5; i*=2)
	{
		I = interval<double>(0.002, i);
		U = interval<double>(5, i);
		R = U / I;
		cout << "Noggrannhet: " << i << "% ger R = " <<  R << endl;
	}

	interval<int> i1(10, 5);
	interval<int> i2(20, 25);
	cout << i1.percentage_error() << ", " << i2.percentage_error() << ", ";
	cout << I.percentage_error() << ", " << U.percentage_error() << ", ";
	cout << R.percentage_error() << endl;

	system("pause");
	return 0;
}